<?php

namespace hclient\base;

/**
 * 上传文件类
 * Class File
 * @package hclient\base
 */
class File
{
    public $name;
    public function __construct(string $file)
    {
        // TODO: Implement __construct() method.
        $this->name = $file;
    }

    public function getFilename():string
    {
        return basename($this->file);
    }

    public function getMimeType():string
    {
        return mime_content_type($this->file);
    }

    public function getPostFilename()
    {
        return $this->getFilename();
    }
}
